import request from '@/utils/request'

// 保存预约考试信息
export function saveExamInfo(data: object) {
  return request({
    url: '/student/bookExam/saveExamInfo',
    method: 'post',
    data: data
  })
}

// 获取学生预约考试信息
export function getExamInfo(examId: number) {
  return request({
    url: '/student/bookExam/getExamInfo/' + examId,
    method: 'get'
  })
}

// 获取时间信息
export function getTime(timeId: number) {
  return request({
    url: '/student/bookExam/getTime/' + timeId,
    method: 'get'
  })
}

// 保存申请免试信息
export function saveExemptInfo(data: object) {
  return request({
    url: '/student/bookExam/exempt',
    method: 'post',
    data: data
  })
}

// 获取申请免试信息
export function getExemptInfo(exemId: number) {
  return request({
    url: '/student/bookExam/getExempt/' + exemId,
    method: 'get'
  })
}

export function getExemInfoByDate(exemDate: Date) {
  return request({
    url: '/student/bookExam/getExemInfoByDate/' + exemDate,
    method: 'get'
  })
}

export function clearByExamId(examId: number) {
  return request({
    url: '/student/bookExam/clearByExamId/' + examId,
    method: 'delete'
  })
}

export function clearByExemId(exemId: number) {
  return request({
    url: '/student/bookExam/clearByExemId/' + exemId,
    method: 'delete'
  })
}
